take and skip in laravel

66

take and skip in laravel -

$count = Attendance::count();
$skip = 5;
$limit = $count - $skip; // the limit
$collection = Attendance::skip($skip)->take($limit)->get();

Comments

Submit
0 Comments